Allow unknown root directory.
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 16 Dec 2018 17:25:59 +0000 (17:25 +0000)
committerAurelien Jarno <aurel32@debian.org>
Sun, 16 Dec 2018 17:25:59 +0000 (17:25 +0000)
commitcac84b119a1c5147a545aff1f6ba62b07188aec6
tree1c11f104de44ce26d33b08595c88cf353be6d98e
parentafb47173020f10d20c1695217b4c7499fb643ab9
Allow unknown root directory.

To be efficient, the remap translator simply returns ports from the underlying
filesystem, and thus the root directory found through browsing '..' is the
underlying root, not the remap root. This should not be a reason for getcwd to
fail.

* sysdeps/mach/hurd/getcwd.c (_hurd_canonicalize_directory_name_internal): Do
not remove the heading slash if we got an unknown root directory.
(__getcwd): Do not fail with EGRATUITOUS if we got an unknown root directory.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name tg-remap_getcwd.diff
sysdeps/mach/hurd/getcwd.c